from selenium.webdriver import Keys
from selenium.webdriver.common.by import By
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
import pytest,time
from Page.Page import Page



class Test_Case():
    # pytest夹具
    @pytest.fixture(scope='session')
    def driver(self):
        self.driver=webdriver.Edge()
        # 窗口最大化
        self.driver.maximize_window()
        # 隐式等待
        self.driver.implicitly_wait(10)
        # yield机制
        yield self.driver
        # 关闭浏览器 清理
        self.driver.quit()

    def test_case(self,driver):
        # 调用page
        po=Page(driver)
        po.test_bing()